import {
  Entity,
  Column,
  PrimaryGeneratedColumn,
  ManyToOne,
  JoinTable,
} from 'typeorm';
@Entity()
export class Code {
  @PrimaryGeneratedColumn()
  id: string;

  @Column()
  username: string;

  @Column()
  code: string;

  @Column()
  createTime: number;

  @Column()
  expireTime: number;

  @Column()
  type: number; // 1 => email 2 => phone
}
